package com.fmsz.physicalheadline.util;

import android.app.Activity;
import android.view.View;

import com.fmsz.physicalheadline.R;

/**
 * Created by Administrator on 2017/1/17.
 */

public class TitleViewBuilder implements View.OnClickListener {
    private final Activity context;

    public TitleViewBuilder(Activity context) {
        this.context = context;
        context.findViewById(R.id.back).setOnClickListener(this);
        context.findViewById(R.id.share).setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.back:
                context.finish();
                break;
            case R.id.share:
                new CustomPopupWindow(v);
                break;
        }
    }
}
